//
//  QMQCComplicationViewCell.m
//  QcMedical1
//
//  Created by 仲启明 on 2016/12/22.
//  Copyright © 2016年 jiawen Du. All rights reserved.
//

#import "QMQCComplicationViewCell.h"
#import "MCFireworksButton.h"

@interface QMQCComplicationViewCell ()


@property (weak, nonatomic) IBOutlet MCFireworksButton *likeButton;


@end

@implementation QMQCComplicationViewCell{
    
    BOOL _selected;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    
    [self texiao];
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (IBAction)didClickBtn:(id)sender {
    
    _selected = !_selected;
    if (_selected) {
        [self.likeButton popOutsideWithDuration:0.5];
        //选中状态下的图
        [self.likeButton setImage:[UIImage imageNamed:@"dy1"] forState:UIControlStateNormal];
        [self.likeButton animate];
        
        self.selected = YES;
    }
    else {
        [self.likeButton popInsideWithDuration:0.4];
        //非选中状态下的图
        [self.likeButton setImage:[UIImage imageNamed:@"dy2"] forState:UIControlStateNormal];
        
        self.selected = NO;;

    }
    
}

- (void)texiao {
    
    
    //特效颜色
    self.likeButton.particleImage = [UIImage imageNamed:@"4"];
    self.likeButton.particleScale = 0.05;
    self.likeButton.particleScaleRange = 0.02;
}


- (void)setModel:(QMQCComplicationModel *)model
{
    
    _model = model;
    
    self.lb_illName.text = model.complication_name;
    
    
}
@end
